<?php

/**
 * @author shuang
 * @date 2016-11-4 14:32:04
 */
use common\components\MTools;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use frontend\models\WB_UserTaskOperate;

$this->registerCssFile("/js/ui-dialog.css");
$this->registerJsFile("/js/dialog-plus-min.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJsFile("/js/jquery.lazyload.min.js", [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJsFile('/js/task.js', [\yii\web\JqueryAsset::className(), "depends" => "\yii\web\JqueryAsset"]);
$this->registerJs('task.showPic();');
echo $this->render("//layouts/breadcrumb", ["url" => Url::toRoute(["showwork", "id" => $id]), "title" => "我的任务"]);
?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12 well ibox float-e-margins">
            <div class="ibox-title">我的任务<span class="pull-right">当前任务<?php echo $count; ?>人已参与，已上传图片<?php echo $pager->totalCount; ?></span></div>
            <div class="well-content ibox-content">
                <ul class="showimg">
                    <?php foreach ($data as $item): ?>
                        <li class="showimg128935358">
                            <?php $imagearr = explode(",",$item["task_image"]);?>
                            <?php foreach($imagearr as $image):?>
                            <img bigsrc="<?php echo MTools::Qiniunow480($image); ?>" class="showimgs" src="<?php echo MTools::Qiniunow480($image); ?>" width="200" height="300" style="float:left;"/>
                            <?php endforeach;?>
                            <p>
                                ip:<?php echo $item["upip"]; ?><br />
                                上传标示：<?php echo $item["id"]; ?><br />
                                时间：<?php echo Yii::$app->formatter->asDatetime($item["uped_at"]); ?><br />
                                <?php if ($item["taskaccount"]): ?>
                                    手机号码：<?php echo $item["taskaccount"]; ?>
                                <?php endif; ?>
                                <button  value="<?php echo $item["id"]; ?>" type="button" style="float: right; margin: 2px;" class="btn  <?php echo $item["is_complain"] == 0 ? "btn-danger" : "btn-primary"; ?>"><?php echo ArrayHelper::getValue(WB_UserTaskOperate::$complain, $item["is_complain"]) ?></button>
                            </p>
                        </li>
                    <?php endforeach; ?>
                </ul>
                <div class="clearfix"></div>
                <br />
                <div class="pagination" style="float:right;">
                    <?php
                    echo
                    \yii\widgets\LinkPager::widget([
                        'pagination' => $pager,
                        'nextPageLabel' => '下一页',
                        'prevPageLabel' => '上一页',
                    ]);
                    ?>
                </div>
            </div>
        </div>
    </div>
</div>